//
//  BPCommon.h
//  BP_NewClient
//
//  Created by normal on 15-1-25.
//  Copyright (c) 2015年 normal. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "UIWebView+LoadProgress.h"
#import "NSString+HTTPExtensions.h"
#import "NSString+ChatRoom.h"

@interface BPCommon : NSObject


+ (UILabel *)addLabel:(CGRect)rect setTitle:(NSString *)title setBackColor:(UIColor *)color setFont:(UIFont *)font;
+ (UIImageView *)addImageView:(CGRect)rect setImage:(NSString *)imageString;
+ (UIView *)addBackView:(CGRect)rect setBackColor:(UIColor *)color;
+ (UIButton *)addButton:(CGRect)rect title:(NSString *)title backGround:(NSString *)imgString setTag:(NSInteger)tag setId:(id)_sel selector:(SEL)selector setFont:(UIFont *)font setTextColor:(UIColor *)color;

// 压缩图片
+ (UIImage*)imageWithImageSimple:(UIImage*)image scaledToSize:(CGSize)newSize;
+ (void)saveImage:(UIImage *)tempImage WithName:(NSString *)imageName;

//通过十六进制和alpha生成颜色
+ (UIColor*)colorWithHexValue:(NSInteger)aHexValue
                        alpha:(CGFloat)aAlpha;

// 通过字符串判断label高度
+ (CGFloat)getLabelHeight:(NSString *)labelString setLabelWidth:(CGFloat)labelwidth setFont:(UIFont *)font;

// 是否是retina屏幕
+ (BOOL)isRetina;

+ (NSMutableArray *)convertToSectionArray:(NSArray *)originDataArray HotCityArray:(NSMutableArray *)hotCity;


@end
